#include "widget.h"
#include "ui_widget.h"

Widget::Widget(QWidget *parent)
    : QWidget(parent)
    , ui(new Ui::Widget)
{
    ui->setupUi(this);
    srand((unsigned)time(NULL));
}

Widget::~Widget()
{
    delete ui;
}


void Widget::on_pushButton_accept_clicked()
{
    //接受
    ui->label->setText("女神女神，嘴儿一个！mua~~");
}

void Widget::on_pushButton_reject_pressed()
{
    //拒绝
    int x = this->geometry().width();
    int y = this->geometry().height();

    int _x = (rand() % x) + 1;
    int _y = (rand() % y) + 1;

    ui->pushButton_reject->move(_x, _y);
}
